package com.mine.crawler.config;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

public class Constants
{
	//Resource folder locations
	public static final String RESOURCE_FOLDER_LOCATION = "resources";
	public static final String LOG_FOLDER_LOCATION = RESOURCE_FOLDER_LOCATION+File.separator +"logs";
	public static final String LIB_FOLDER_LOCATION = RESOURCE_FOLDER_LOCATION+File.separator +"lib";
	public static final String PROP_FOLDER_LOCATION = RESOURCE_FOLDER_LOCATION+File.separator +"properties";

	//Property File Names 
	public static final String CONFIG_FILE_NAME = "crawlerConfig.properties";
	public static final String LOG4J_FILENAME = "Log4J.properties";
	public static final String ENVIRONMENT_FILENAME = "ENVironment.properties";
	public static final String MySqlDB_FILENAME = "Database.properties";
	public static final String ENV_OFFICE_FILENAME = "Office.properties";
	public static final String ENV_HOME_ZLAPPY_FILENAME = "homeZ-Lappy.properties";
	public static final String ENV_HOME_ELAPPY_FILENAME = "homeE-Lappy.properties";
	
	//BYTE Definitions
	public static final int KILOBYTE = 1024;
	public static final int MEGABYTE = KILOBYTE * KILOBYTE;
	public static final int GIGABYTE = KILOBYTE * MEGABYTE;
	
	//Buffer Definitions
	public static final int BUFFERSIZE_20_KILOBYTE = 20 * KILOBYTE;
	public static final int BUFFERSIZE_40_KILOBYTE = 40 * KILOBYTE;
	public static final int BUFFERSIZE_2_MEGABYTE = 2 * MEGABYTE;
	public static final int BUFFERSIZE_4_MEGABYTE = 4 * MEGABYTE;
	
	//DMOZ File names 
	public static final String DMOZ_Structure_Path = "structure.rdf.u8";
	public static final String DMOZ_Content_Path = "content.rdf.u8";
	//	-- Props specific to Reading Files
	public static final int LINES_READ_FROM_FILE = 100;
	public static final int URL_INITIAL_HASHMAP_SIZE = 2000;

	//
	public static final String DMOZ_Directory_Path = "D:\\Program Files\\eclipse\\workspace\\files";
	public static final Map<Integer, String> ConstantProp = new HashMap<Integer, String>();
	static
	{
		ConstantProp.put(Integer.valueOf(DMOZ_Directory_Path.hashCode()), DMOZ_Directory_Path );
		//ConstantProp.put(Integer.valueOf(CONFIG_FILE_NAME.hashCode()), CONFIG_FILE_NAME);
		//ConstantProp.put(key, value)
	}
	
	//PLZ ADD INFO
	public static final int LOGGER_LOCATION = 1;
	public static final int CONSOLE_LOCATION = 2;

	//DEBUG FLAGS for FILEs
	public static final boolean DEBUG_BASECLASS = false;
	public static final boolean DEBUG_MYLINK = false;
	public static final boolean DEBUG_MYLINK_IDENTIFIER = false;
	public static final boolean DEBUG_CONFIG_CONFIG_LOADER = false;
	public static final boolean DEBUG_CONFIG_DMOZ_XML_PROCESSOR = false;
	public static final boolean DEBUG_CONFIG_DMOZ_XML_PROCESSOR_CONTENT = false;
	public static final boolean DEBUG_CONFIG_DMOZ_XML_PROCESSOR_STRUCT = false;
	public static final boolean DEBUG_CONFIG_DMOZ_FILEURL_GENERATOR = false;
	public static final boolean DEBUG_CONFIG_INITIALIZE_CRAWLER_APPLICATION = false;
	
}
